home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
bbs_door
/
bbsc61.zip
/
BBSCHAT.DOC
next >
Wrap
Text File
|
1996-05-26
|
13KB
|
361 lines
BBSCHAT
Version 6.1
Written by Matthew Probert
Published by Servile Software
NOTE:
Two executable files are supplied in the package: BBSCHAT.EXE and
FSCHAT.EXE. FSCHAT.EXE will make use of ANSI to provide a nice split
screen environment. BBSCHAT.EXE will work even if the caller does not
support an ANSI terminal. Throughout this document you may optionally
replace "bbschat" with "fschat", the programs are otherwise identical.
DESCRIPTION:
BBSChat is a PC BBS chat door system for BBS which generate a DOOR.SYS
file - such as Remote Access for example. BBSChat is loosely based
upon the BBS door "SHAMpage" by Rich Waugh of Drawbridge BBS. SHAMpage
response files may be used with only slight modification by BBSChat.
(See CONVERTING FROM SHAMPAGE TO BBSCHAT).
Although I have been developing computer conversation systems for a
couple of years, I decided to clone SHAMpage because although its
good, I was frustrated by the limitations imposed by it which made it
too obviously a computer, the logoff screen with its copyright message
for a start!
There are two ways of looking at BBSChat. Firstly as entertainment.
Secondly as a system for experimenting with Turing's theory of
thinking computers. By careful selection of responses and key words, a
configuration can be developed which appears to be quite intelligent.
However, BBSChat is still only a slot-and-frame parser!
IMPORTANT: BBSChat will make use of ANSI if the caller has it enabled,
but if not will work perfectly well in monochrome. No sysop
adjustments are necessary.
IN BRIEF:
BBSChat is started from the command line with two required parameters
and two optional parameters. The first parameter is the name and path
to your BBS information file; DOOR.SYS. The second parameter is the
path and name to the configuration file to use for this personality.
For example:
BBSCHAT C:\RA\DOOR.SYS HARRY.CFG [port][fossil]
IMPORTANT! BBSChat will assume that COM1 = 03F8 IRQ 4, COM2 = 02E8
IRQ3, COM3 = 03E8 IRQ4 and COM4 = 02E8 IRQ 3 These are the standard
COM port addresses and IRQ levels.
Upon starting, BBSChat may display "Paging <name>" if the paging
option is active in the configuration file, and there is then a
randomly generated delay before the conversation commences by
displaying one of the "opening lines" selected at random. The user and
the computer then take turns to present typed text to each other, like
a conversation. BBSChat responds through "replies" contained in the
configuration file which are selected based upon matching of key words
and phrases in the users input with those contained in the data file.
Keywords are matched on a first come first served basis. So specific
keyword phrases should occur at the start of the data file, with more
general keywords towards the end.
Should the user not make any keyboard entry for 5 minutes, or if the
user's allocated time expires BBSChat will terminate and return to the
BBS.
If the caller has ANSI enabled, BBSChat will display the caller's
prompts and text in yellow, and the computers's in cyan. Otherwise
both will be in monochrome. BBSChat detects and adjusts for the
caller's ANSI settings automatically.
The results of the conversation are added to the end of the file
"chat.log" in the current directory.
LIMITS:
Opening lines 50
No match responses 100
Data blocks 300
Aliases 10 per data block
Responses 20 per data block
VARIABLES:
Within the reply text in the data file various variables may be
included which will be expanded during the conversation.
*DELAY* Pause for one second
*END* Force end of conversation, displaying "fed up message".
*USER* Caller's first name
*CITY* Caller's city
*PHONE* Caller's home phone number
*LAST* Last phrase (thread) output by the computer
*SEC* The caller's security level
*TIME* Current time is inserted
*LF* Line is split, carriage return and line feed inserted
*TIMEOFDAY* MORNING, AFTERNOON or EVENING inserted as appropriate
*timeofday* morning, afternoon or evening inserted as appropriate
*Keyword* The matched keyword is inserted with first letter capitalised
*KEYWORD* The matched keyword is inserted capitalised
*keyword* The matched keyword is inserted as it was typed by the user
*Object* The object is inserted with first letter capitalised
*OBJECT* The object is inserted capitalised
*object* The object is inserted as it was typed by the user
*next* The word following the last matched keyword is inserted as
it was typed by the user
DATA FILE STRUCTURE:
; optional comment lines
N Number of opening lines
XXXX Opening line 1
XXXX Opening line 2
; Then the "no match responses"
NOMATCH
N Number of responses for non-matched words
XXXX Non-matched response 1
XXXX Non-matched response 2
; Finally the data blocks
THREAD The last phrase the computer output (maximum of 80 characters)
KEYWORD Keyword or phrase
*ALIAS* An alias key word for this section
N Number of responses in this section
XXXX Response 1
Please refer to the supplied demonstration file 'HARRY.DAT' for an
example of the data file in practice.
Replies are what BBSChat will display in response to user entered data
and are terminated by a carriage-return/line feed in the configuartion
file. Keywords and aliases MUST be in upper case Any line commening
with ; is ignored. Variables may be inserted in any response, except
that: keyword variables may not be used in either opening or non-
matched responses
When the user enters some text, BBSChat searches the text for each
keyword and then associated aliases in turn. Keywords/aliases are
matched if they occur in the entered text. So it is important to
include spaces around words you want to match in full, for example:
NO will match with NO, NOW, NOTHING etc
but
" NO " will only match with NO
Keywords/aliases may be multiple words, and quote marks are ignored,
eg:
"WHAT IS THE TIME"
When BBSChat matches a keyword/alias it ouputs one of the recorded
responses at random. That response is then deleted from memory. If
there are no responses to be made, BBSChat searches for the next
matching keyword or phrase. When all matching keywords have been
exhausted a NOMATCH response is selected at random and output. If
there are no responses left to be made, BBSCHAT terminates the
conversation. If a match cannot be made with the users input, one of
the NOMATCH responses is output in the same way.
For example:
Consider a simple personality file thus:
;----------------------------------------------------------------------------
;
; These are the opening lines which are generated randomly.
;
;----------------------------------------------------------------------------
3
Opener 1
Opener 2
Opener 3
;----------------------------------------------------------------------------
;
; These are lines sent when no keyword match occurs.
;
;----------------------------------------------------------------------------
NOMATCH
5
Random 1
Random 2
Random 3
Random 4
Random 5
;----------------------------------------------------------------------------
LIFE
3
Life response 1
Life response 2
Life response 3
;----------------------------------------------------------------------------
BITCH
3
Bitch response 1
Bitch response 2
Bitch response 3
When the human caller enters the phrase "Life's a bitch", BBSCHAT will search
and make a match on the word "LIFE" and ouput one of the three life responses
at random. The second time the caller enters the phrase one of the remaining
two life responses will be output and so on. When all three life responses
have been output and the caller enters the same phrase again, BBSCHAT will
then match on the next rcognisable keyword "BITCH" and will output one of the
three bitch responses at random.
A conversation thread may be achieved by using subsets of keywords linked to
different threads. Any data block which includes a thread will only be
searched for a keyword match if the last output from the computer matches that
data block's thread. To make this easier to use, the data block will be
accepted if the last phrase the computer output is the same as the thread or
if the last ouput phrase commenced with the thread or if the data block has a
null thread. For example;
Computer's ouptut was "Yes I do that often"
This will match with the following data block threads;
"Yes"
"Yes I do"
"Yes I do that often"
but it will not match with
"Yes I am"
The user may terminate the session by entering 'BYE', 'QUIT' or 'EXIT' as the
first text in their input.
The conversations made are recorded in a file 'CHAT.LOG' which is appended
with each new conversation, and resides in the current DOS directory.
BBS USAGE:
If you are using Remote Access as a BBS, you can configure a menu option to
call BBSChat through a batch file. Use a menu type 7 command. For example in
the menu "Optional data:" field include the line:
*C /C C:\BAT\CHAT.BAT
Remote Access will then shell to DOS and execute the batch file "chat.bat"
which may look like:
@echo off
cd \doors\bbschat
bbschat c:\ra\door.sys sysop.cfg
cd \ra
exit
It is not usually necessary to swap Remote Access out of memory to run
BBSChat.
BEFORE YOU GO:
A consideration for you sysops, is however, that BBSChat does not identify
itself as a computer. You may like to add a displayed text file after the user
exits from BBSChat to reassure them that it was just a joke, or whatever.
Otherwise, if your BBSChat configuration is rude or offensive, the caller may
actually think it was you being so rude to them! Which has happened!!!
LOCAL MODE:
To run BBSChat locally, change the COM port definition to COM0 in door.sys.
See the enclosed "demo.bat" and "door.sys" files for an example.
CONFIGURATION FILE:
BBSChat requires a configuration file. This is an ascii text file comprised of
several lines as follows:
Format Description Example
---------------------------------------
nnnn Paging 1
xxxx Data file name Sysop.dat
xxxx Computer's name Sysop
nnnn Delay on typing 200
xxxx Termination message See you later then.
xxxx Fed up message I've had enough of this, I'm off to the pub
xxxx Optional paging message Oi Sysop, you out there?
nnnn Screen divider 0
xxxx Lower left title My Chat
xxxx Lower Centre title Now in chat mode
xxxx Lower Right title (c) 1995 XYZ Software
nnnn Dividing bar colour 7
nnnn Dividing text colour 5
nnnn Upper text colour 7
nnnn Lower text colour 7
nnnn Digit colour 7
nnnn Punctuation colour 7
Please note: The "termination" and "fed up" messages may not be longer than 80
characters. If they are they may crash the computer.
The paging message is optional, if not supplied the default "Paging
<computer's name> message will be displayed, otherwise the text in the paging
message will be displayed. This may be a maximum length of 80 characters, and
must end in a carriage-return. The screen divider is a single number
detremining the FSCHAT screen dividing characters:
0 Solid bar
1 Double line
CONVERTING FROM SHAMPAGE TO BBSCHAT:
As a mark of respect to SHAMpage, I have deliberately immitated it where ever
possible. However, there are differences between SHAMpage and BBSChat. If you
intend to convert an existing SHAMpage configuration file into one compatible
with BBSChat you should note the following differences:
1) BBSChat does not use EXITMSGs
2) BBSChat does not recognise all the SHAMpage variables. If BBSChat displays
*PASSWORD* for example, it's because it doesn't recognise it as a variable!
3) BBSChat matches keywords and aliases in the order they occur within the
data file. This allows you to include keywords which are subsets of other
keywords or aliases so long as they occur later in the data file. Remember
that unlike Shampage, BBSChat includes a thread in the data block. So you
must include an additional line in the .DAT file immediately before the
keyword.
4) BBSChat supports some variables which SHAMpage V3.55 doesn't. Namely;
*CITY*, *END*, *DELAY*, *OBJECT* and *NEXT*.
This is a Servile Software AI Laboratory product.
All enquiries to:
Matthew Probert
Servile Software
5 Longcroft Close
Basingstoke
Hampshire
RG21 8XG
England
Telephone 01256 414072